{% extends 'TopxiaAdminBundle::layout.html.twig' %}

{% set script_controller = 'setting/user-center' %}
{% set menu = 'admin_setting_user_center' %}

{% block main %}

{% set user_center_name = mode == 'phpwind' ? 'WindID' : 'Ucenter' %}

<div class="page-header">
  <h1>{{'管理员帐号同步'|trans}}</h1>
</div>

{% if not bind %}

{{ web_macro.flash_messages() }}

<form class="form-horizontal with-discuz" method="post" novalidate id="sync-discuz-form">
  <div class="alert alert-info">
    <p><strong>{{'注意事项：'|trans}}</strong></p>
    <p>{{'同步管理帐号，是将用户中心'|trans}}{{ user_center_name }}{{'的管理员帐号的用户名、Email、密码，覆盖掉EduoSoho中您'|trans}}<strong>{{'当前登录'|trans}}</strong>{{'的管理帐号。'|trans}}<br>{{'每个帐号只能同步一次。'|trans}}</p>
  </div>

  <div class="row form-group">
    <div class="col-md-3 control-label"><label>{{ user_center_name }}{{'管理员用户名'|trans}}</label></div>
    <div class="controls col-md-8">
      <input class="form-control" name="nickname">
    </div>
  </div>

  <div class="row form-group">
    <div class="col-md-3 control-label"><label>{{ user_center_name }}{{'管理员密码'|trans}}</label></div>
    <div class="controls col-md-8">
      <input type="password" class="form-control" name="password">
    </div>
  </div>

  <div class="row form-group">
    <div class="col-md-3 control-label"></div>
    <div class="controls col-md-8">
      <button type="submit" class="btn btn-primary">{{'同步'|trans}}</button>
      <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
    </div>
  </div>

</form>

{% else %}
  <div class="alert alert-danger">{{'该管理员帐号已同步，无需再同步。'|trans}}</div>

{% endif %}

{% endblock %}